package cn.jsj.dispose;

import java.io.IOException;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
/**
 * 删除行政人员信息处理类
 * @author LI
 *
 */
 public class DeleteAdminPersInfo extends javax.servlet.http.HttpServlet implements javax.servlet.Servlet {
	public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
		//调试信息
		cn.jsj.utils.SysLogger.PrintInfo("进入删除行政人员信息处理类");

		//获得行政人员ID
		int adminId=Integer.parseInt(request.getParameter("adminId"));

		//更新数据库
		cn.jsj.dao.TblAdminPersonnelDAO tapd=new cn.jsj.dao.TblAdminPersonnelDAO();
		int deleteSuccess=tapd.deletePracLawyerInfo(adminId);

		//调试信息
		cn.jsj.utils.SysLogger.PrintInfo("删除结果------->"+deleteSuccess);

		//输出信息到客户端
		java.io.PrintWriter out=response.getWriter();
		if(deleteSuccess==1){
			out.println("{message:'删除成功！！！'}");
		}
		else{
			out.println("{message:'删除失败！！！'}");
		}
		out.flush();
		out.close();



	}
	public void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
		doGet(request,response);
	}
}